package io.packaging;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;

public class Text2 {
    public static void main(String[] args) {
        try (  FileReader a=new   FileReader("D:\\workspace\\basic-chapter\\src\\io\\packaging\\a.txt");
         //创建字符输出包装流进行包装
              BufferedReader B=new  BufferedReader(a);
        ) {
 //           int s ;
//            char []buffer=new char[3];
//            while((s=B.read(buffer))!=-1){
//                System.out.println(new String(buffer,0,s));
//            }
            System.out.println(B.readLine());
            String s;
            while ((s=B.readLine())!=null)
            {
                System.out.println(s);
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
